package com.dgut;

import org.springframework.boot.CommandLineRunner;
import org.springframework.core.env.Environment;


public class MyCommandLineRunner implements CommandLineRunner {
    Environment env;

    public MyCommandLineRunner(Environment env){
        this.env = env;
    }

    @Override
    public void run(String... args) throws Exception {
        System.out.println("利用Spring Boot自动配置的CommandLineRunner");
//        System.out.println("生成一个随机数字符串：" + Objects.requireNonNull(env.getProperty("random.")));
        System.out.println("我是commandLindRunner,我现在运行的时间是"+System.currentTimeMillis());
    }

}
